package radubrehar;

public class UserSessionLink {

	private int id;
	private int userSessionId;
	private String URL;

	public int getUserSessionId() {
		return userSessionId;
	}

	public void setUserSessionId(int userSessionId) {
		this.userSessionId = userSessionId;
	}

	public String getURL() {
		return URL;
	}

	public void setURL(String url) {
		URL = url;
	}

	@Override
	public boolean equals(Object link) {
		if (link instanceof UserSessionLink) {
			UserSessionLink l = (UserSessionLink) link;
			if (l.getURL().equals(this.URL)) {
				return true;
			}
			return false;
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		return this.URL.length();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
}
